"use client";

import { useEffect } from "react";
import { getCurrentTheme, applyTheme } from "@/lib/themes";

interface ThemeProviderProps {
  children: React.ReactNode;
}

export function ThemeProvider({ children }: ThemeProviderProps) {
  useEffect(() => {
    // 页面加载时应用保存的主题
    const savedTheme = getCurrentTheme();
    applyTheme(savedTheme);
  }, []);

  return <>{children}</>;
} 